import { AudioMgr } from "../../AudioMgr";
import { Constant } from "../../Constant";
import { Main } from "../../Main";
import StateBase from "../StateBase";

export default class SecondRoleEnterState extends StateBase {
    begin(preState: number): void {
        super.begin(preState);
        console.log('SecondRoleEnterState state--begin');
        const main = this.getUserData() as Main;
        main.enterRolesRoles[1].playAnimation();
        //main.roundIndex = 2;
        main.scheduleOnce(() => {
           
            AudioMgr.inst.playOneShot(main.heroEnter);
        }, 1)
        main.scheduleOnce(() => {

            main.mainFsm.goToState(Constant.MainState.SecondRecruit1Prepare, main);
        }, 2)
    }
}